package com.qidian.buy.search.controller;

import com.qidian.buy.search.service.SearchItemService;
import com.qidian.buy.util.pojo.QdResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author: 戴着假发的程序员
 * Date: 2024-05-13 14:07
 * company: 起点编程
 **/
@RestController
public class SearchItemController {
    @Autowired
    private SearchItemService searchItemService;
    @GetMapping("/s")
    public QdResult search(String kw, @RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "60") int limit){
        return searchItemService.doSearch(page,limit,kw);
    }
}
